<template>
	<div class="background">
		<div id="nav">
			<router-link to="/">MyOnePage</router-link> |
			<router-link to="/about">About</router-link>|
			<router-link to="/home">Home</router-link>|
			<router-link to="/login">Login</router-link>
		</div>
		<div class="front">
			<h1>一剪梅</h1>
			<h1>作者：唐寅</h1>
			<h1>&nbsp;雨打梨花深闭门，忘了青春，误了青春。</h1>
			<h1>&nbsp;赏心乐事共谁论？花下销魂，月下销魂。</h1>
			<h1>&nbsp;愁聚眉峰尽日颦，千点啼痕，万点啼痕。</h1>
			<h1>&nbsp;晓看天色暮看云，行也思君，坐也思君。</h1>
		</div>
	</div>
	
</template>

<script>
	export default {

		/* beforeRouteEnter(to, from, next) {
			// 添加背景色
			document.querySelector('body').setAttribute('style', 'background-color:#FFFFE0')
			next()
		} */
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
	.background {
		width: 100%;
		height: 100%;
		/**宽高100%是为了图片铺满屏幕 */
		z-index: -1;
		position: absolute;
		//设置背景图
		background: url(../../public/bgimgs/bg-b.jpg);
	}
	.front{
		z-index: 1;
	}
</style>
